import pygame
from pygame.locals import *
from spritesheet import *

class Bullet(pygame.sprite.Sprite):
	def __init__(self, start, direction):
		pygame.sprite.Sprite.__init__(self)
		
		self.direction = direction
		self.rect = start
		self.image = pygame.surface.Surface((64, 64))
		self.image = spritesheet.get_image(Rect((320, 0), (64, 64)))
		
	def update(self):
		if direction == 0:
			self.rect.move_ip(0, -6)
		elif direction == 1:
			self.rect.move_ip(6, 0)
		elif direction == 2:
			self.rect.move_ip(0, 6)
		elif direction == 3:
			self.rect.move_ip(-6, 0)